package com.wzh.mall.ware.feign;

import com.wzh.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @program: mall
 * @description:
 * @author: Mr.Wang
 * @create: 2021-09-06 14:28
 **/
@FeignClient("mall-product")
public interface ProductFeignService {
    
    
    /*
    *  /product/skuinfo/info/{skuId}
    *  /api/product/skuinfo/info/{skuId}
    *  1) 让所有请求过网关
    *       1、@FeignClient("mall-gateway") 给mall-gateway所在的机器发送请求
    *       2、配置：@RequestMapping("/api/product/skuinfo/info/{skuId}")
    *  2) 直接让后台进行处理
    *        1、@FeignClient("mall-product") 给mall-product所在的机器发送请求
    *        2、配置：@RequestMapping("product/skuinfo/info/{skuId}")
    * */
    @RequestMapping("/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);
}
